Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix bug 948057] (B2G Browser) Zooming in on modal window causes graphical issues #1729

Conversation

alexgibson
Copy link
Member

Firefox OS performs a layout/reflow on position:fixed elements when the user pinch/zooms. This affects Mozilla.Modal, resulting in layout issues and odd glitches.

This PR switches to using position: absolute for small viewports, which does not exhibit the same behavior and performs more predictably.

I've tested this change on a GeeksPhone Peak device.

@jpetto
Copy link
Contributor

jpetto commented Feb 24, 2014

Only case I could find here that this wouldn't fix is if there's a modal created with allowScroll: true. Zooming on a modal without the noscroll class applied would have the same layout issues.

I'm wondering if mozilla-modal.js should override allowScroll on small viewports, forcing it to be false if the screen size is less than our tablet breakpoint. Could maybe use the var isSmallViewport = $w.width() < 760; line from the /firefox/partners/ page?

@alexgibson
Copy link
Member Author

Could maybe use the var isSmallViewport = $w.width() < 760; line from the /firefox/partners/ page?

Good suggestion, I'll see to adding it.

@alexgibson
Copy link
Member Author

PR updated!

@jpetto
Copy link
Contributor

jpetto commented Feb 24, 2014

Looks good! r+ 🔍

jpetto added a commit that referenced this pull request Feb 24, 2014
…dal-window-causes-graphical-issues

[fix bug 948057] (B2G Browser) Zooming in on modal window causes graphical issues
@jpetto jpetto merged commit 95e62bb into mozilla:master Feb 24, 2014
@alexgibson alexgibson deleted the bug-948057-btg-zooming-on-modal-window-causes-graphical-issues branch May 12, 2014 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants